package com.four.shop.controller;

import com.four.shop.entity.Adder;
import com.four.shop.service.AdderService;
import com.guli.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author:wsy
 * @Date: 2021/12/9/15:35
 */


@RestController
@RequestMapping("shop/adder")
public class AdderController {

    @Autowired
    private AdderService adderService;

    /**
     * 地址二级联动
     * @return
     */
    @GetMapping("/list/twoAdder")
    public R twoAdder(){
        List<Adder> adderList=adderService.twoAdder();
        return R.ok().put("adderList",adderList);
    }
}
